<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

//$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
$rhDescription="Биллинг Radioheart.ru";
$current_controller=$this->params['controller'];
$current_action=$this->params['action'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $rhDescription ?>:
		<?php echo $title_for_layout; ?>
	</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
        <link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
	<!--<link rel="stylesheet" href="http://yandex.st/highlightjs/7.3/styles/default.min.css">-->
                <script src="http://yandex.st/highlightjs/7.3/highlight.min.js"></script>
                <script>hljs.initHighlightingOnLoad();</script>
	<?php
		echo $this->Html->meta('icon');

		//echo $this->Html->css('cake.generic');
		echo $this->Html->css('../style');
		echo $this->Html->css('habra_code');

		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
		//echo $this->Html->script('jquery-1.6.4.min');
		echo $this->Html->script('pGenerator.jquery');
		echo $this->Html->script('encr');
		echo $this->Html->script('jquery.md5');
		echo $this->Html->script('jquery.cookie');
		echo $this->Html->script('jquery.placeholder.min');
		echo $this->Html->script('jquery.qtip.min');
		if(($current_controller=='users') and ($current_action=='add'))
		{
			echo $this->Html->css('../style_steps');
		}
		echo $this->Html->css('jquery.qtip.min');
	?>
        <script type="text/javascript">
            function logo_heartbit()
            {
                $(".logo").animate({ opacity: 0.4 },2000).animate({ opacity: 1 },2000);
            }
	    jQuery.fn.extend({
		scrollToMe: function () {
		    var x = jQuery(this).offset().top - 100;
		    jQuery('html,body').animate({scrollTop: x}, 500);
	    }});		
            $(document).ready(function(){
		$('.billing_order_super_extend_title').qtip({
		    content: 'Используйте слайдер ниже, чтобы указать желаемое число месяцев для оплаты',
		    style: {
			classes: 'qtip-light qtip-bootstrap'
		    },
		});
		var screen_height=$(window).height();

		$(".billing_not_logged_wrp").css('height',screen_height);
		var div=$('#billing_login_wrapper');
		div.css("top", ($(window).height() - div.height())/2 -43-60  + 'px');
		$("#reload").click(function(){
			$('#captcha').attr('src', $('#captcha').attr('src') + '?' + new Date().getTime())
		    });
		var url_hash=window.location.hash;
		if (url_hash.length>0) {
			url_hash=url_hash.replace("#","");
			var small_class=".class_id_small_"+url_hash;
			var full_class=".class_id_full_"+url_hash;
			$(small_class).scrollToMe();
			$(small_class).find('.billing_orders_small_expand').click();
			$(full_class).find('.billing_order_super_info').hide();
			$(full_class).find('.billing_order_super_extend').show();
			billing_orders_select_line_delete_class(0);
			$(full_class).find('.class_full_extend_'+url_hash).addClass("billing_order_select_line_current");
			//alert(full_class);
			//$(full_class).click();
			
			

		}
                
                logo_heartbit();
                var beats=setInterval('logo_heartbit()',4000);
                $(".logo").hover(function(){
                    $(".logo").animate({ opacity: 1 },1000);
                    clearInterval(beats);
                },function(){
                    logo_heartbit();
                    var beats=setInterval('logo_heartbit()',4000); }); 
                $(".billing_order_select_line").click(function(){
			
                  //var id=event.target.id;
		  var id=$(this).attr('id')
                  billing_orders_select_line_delete_class(id);
                  $("#"+id).addClass("billing_order_select_line_current");
                  billing_orders_select_line_hide_all_divs();
                  $("#div_"+id).show();
                });
		$(".billing_sidebar_userinfo").click(function(){
			window.location.href = "<?php echo $this->Html->url(array('controller'=>'users','action'=>'addcredits')); ?>";
		});
		$('.billing_streams_delete_link').on('click', function () {
			return confirm('Вы действительно хотите удалить дополнительный поток?');
		});
            });
            function billing_orders_select_line_delete_class(id)
            {
              $(".billing_order_select_line_current").each(function(index){
                $(this).removeClass("billing_order_select_line_current");
              });
            }
            function billing_orders_select_line_hide_all_divs(){
              $(".billing_order_super_shower").each(function(index){
                $(this).hide();
              });
            }
            function expand(div_numder){
	      rollaup_all();
              $("#order_small_"+div_numder).hide();
              $("#order_full_"+div_numder).show();
	      //при отркытии большого, сначала скрываем все внутренние, потом показываем информацию
	      billing_orders_select_line_hide_all_divs();
	      $(".billing_order_select_line_current").each(function(index){
                $(this).removeClass("billing_order_select_line_current");
              })
	      var id="order_super_info_link_"+div_numder;
	      $("#"+id).addClass("billing_order_select_line_current");
	      $("#div_"+id).show();
            }
	    function expand_and_pay(div_numder){
	      rollaup_all();
              $("#order_small_"+div_numder).hide();
              $("#order_full_"+div_numder).show();
	      //при отркытии большого, сначала скрываем все внутренние, потом показываем информацию
	      billing_orders_select_line_hide_all_divs();
	      $(".billing_order_select_line_current").each(function(index){
                $(this).removeClass("billing_order_select_line_current");
              })
	      var id="order_super_info_link_"+div_numder;
	      $("#"+id).addClass("billing_order_select_line_current");
	      $("#div_"+id).show();
	      //show extend div
	      $("#order_super_extend_link_"+div_numder).click();
            }
            function rollup(div_numder){
              $("#order_full_"+div_numder).hide();
              $("#order_small_"+div_numder).show();
            }
	    function rollaup_all() {
		$(".billing_orders_full_wrp").each(function(index){
                if($(this).is(":visible"))
		{
			var id=$(this).attr('id');
			id=id.replace("full", "small");
			$(this).hide();
			$("#"+id).show();
		}
              });
	    }
        </script>
        <script>
          $(function() {
            $( ".billing_order_super_extend_slider" ).each(function(index){

              $(this).slider({
                range: "max",
                min: 1,
                max: 12,
                value: 1,
                step:1,
                slide: function( event, ui ) {
                  var id=$(this).attr('id');
                  var data="";
                  var discount=1;
                  switch(ui.value)
                  {
                    case 1: data="1 месяц"; break;
                    case 2: data="2 месяца"; break;
                    case 3: data="3 месяца";discount=0.95; break;
                    case 4: data="4 месяца";discount=0.95; break;
                    case 5: data="5 месяцев";discount=0.95; break;
                    case 6: data="6 месяцев";discount=0.9; break;
                    case 7: data="7 месяцев";discount=0.9; break;
                    case 8: data="8 месяцев";discount=0.9; break;
                    case 9: data="9 месяцев";discount=0.9; break;
                    case 10: data="10 месяцев";discount=0.9; break;
                    case 11: data="11 месяцев";discount=0.9; break;
                    case 12: data="12 месяцев";discount=0.85; break;

                  }
                  $("#monthes_div_"+id).html(data);
                  //var month_cost=$("#result_cost_"+id).html();
                  var month_cost=$("#result_cost_"+id).attr('value')*discount;
		  month_cost=month_cost.toFixed(2);
                  var total_cost=month_cost*ui.value;
                  $("#span_cost_"+id).html(total_cost.toFixed(2)+" $");
                  $("#span_monthes_"+id).html("за "+data);
		  $("#monthes_input_"+id).val(ui.value);
                  var balance_value=$("#billing_sidebar_balance_value").attr('value');
                  var notice="";
                  if(balance_value<total_cost)
                  {
                    $("#pay_button_"+id).addClass("billing_orders_pay_button_disabled");
                    $("#pay_button_"+id).click(function () {return false;});
                    var not_enought=total_cost-balance_value;
		    not_enought=not_enought.toFixed(2);
                    notice="Для продления заказа на указанное количество месяцев<br /> недостаточно "+not_enought+" $ на балансе. <br /><a href='/billing/users/addcredits'>Пополнить баланс</a><br /><a href='/billing/users/addcredits/"+not_enought+"'>Пополнить баланс на "+not_enought+" $</a>";
                  }
                  else
                  {
                    $("#pay_button_"+id).removeClass("billing_orders_pay_button_disabled");
                    $("#pay_button_"+id).unbind('click');
                    notice="Средства будут списаны с вашего баланса"
                  }
                  $("#div_notice_"+id).html(notice);
                  //$.cookie('bitrate', ui.value, { expires: 1 });
                  //calculate();
                },create: function( event, ui ) {
			ui.value=1;
		  var id=$(this).attr('id');
                  var data="";
                  var discount=1;
                  switch(ui.value)
                  {
                    case 1: data="1 месяц"; break;
                    case 2: data="2 месяца"; break;
                    case 3: data="3 месяца";discount=0.95; break;
                    case 4: data="4 месяца";discount=0.95; break;
                    case 5: data="5 месяцев";discount=0.95; break;
                    case 6: data="6 месяцев";discount=0.9; break;
                    case 7: data="7 месяцев";discount=0.9; break;
                    case 8: data="8 месяцев";discount=0.9; break;
                    case 9: data="9 месяцев";discount=0.9; break;
                    case 10: data="10 месяцев";discount=0.9; break;
                    case 11: data="11 месяцев";discount=0.9; break;
                    case 12: data="12 месяцев";discount=0.85; break;

                  }
                  $("#monthes_div_"+id).html(data);
                  //var month_cost=$("#result_cost_"+id).html();
                  var month_cost=$("#result_cost_"+id).attr('value')*discount;
		  month_cost=month_cost.toFixed(2);
                  var total_cost=month_cost*ui.value;
                  $("#span_cost_"+id).html(total_cost.toFixed(2)+" $");
                  $("#span_monthes_"+id).html("за "+data);
		  $("#monthes_input_"+id).val(ui.value);
                  var balance_value=$("#billing_sidebar_balance_value").attr('value');
                  var notice="";
                  if(balance_value<total_cost)
                  {
                    $("#pay_button_"+id).addClass("billing_orders_pay_button_disabled");
                    $("#pay_button_"+id).click(function () {return false;});
                    var not_enought=total_cost-balance_value;
		    not_enought=not_enought.toFixed(2);
                    notice="Для продления заказа на указанное количество месяцев<br /> недостаточно "+not_enought+" $ на балансе. <br /><a href='/billing/users/addcredits'>Пополнить баланс</a><br /><a href='/billing/users/addcredits/"+not_enought+"'>Пополнить баланс на "+not_enought+" $</a>";
                  }
                  else
                  {
                    $("#pay_button_"+id).removeClass("billing_orders_pay_button_disabled");
                    $("#pay_button_"+id).unbind('click');
                    notice="Средства будут списаны с вашего баланса"
                  }
                  $("#div_notice_"+id).html(notice);
		}
              });
            });
          });
        </script>
	<script type="text/javascript">
                      function closeOnLoad(myLink)
                      {
                        var newWindow = window.open(myLink);
                        setTimeout(function(){newWindow.close();alert("Диджей успешно кикнут!");},1000);
                      }
                function icecast(action,serverip,port,orderid)
                {
                  $.ajax({
                                 type: "GET",
                                 url: "modules/billing/icecast.php",  //Тут указываем файл со скриптами
                                 cache: false,
                                 data: "serverip="+serverip+"&port="+port+"&action="+action,
                                 success: function(res){
                                   //alert(res);
                                   if(strpos(res,"illedKilled")>0)
                                    alert("Сервер отключен");
                                   else
                                     if(strpos(res, "hanged groupid to")>0)
                                      alert("Сервер включен");
                                     else
                                        alert("Что-то не так, сервер не запущен/не отключен");
                                   icecaststatus(serverip,port,orderid);
                                 }
                  });
                }
		function liquidsoap(action,serverip,port)
                {
                  $.ajax({
                                 type: "GET",
                                 url: "modules/billing/liquidsoap.php",  //Тут указываем файл со скриптами
                                 cache: false,
                                 data: "serverip="+serverip+"&port="+port+"&action="+action,
                                 success: function(res){
                                   //alert(res);
                                   if(strpos(res,"illedKilled")>0)
                                    alert("Поток отключен");
                                   else
                                     if(res=='')
                                      alert("Поток включен");
                                     else
                                        alert("Что-то не так, поток не запущен/не отключен");
                                 }
                  });
                }
                function strpos (haystack, needle, offset) {
                  var i = (haystack + "").indexOf(needle, (offset || 0));
                  return i === -1 ? false : i;
                }
		                function icecaststatus(serverip,port,orderid)
                                 {
                 
                                   $.ajax({
                                                  type: "GET",
                                                  url: "http://radioheart.ru/billing/modules/billing/icecast_status.php",  //Тут указываем файл со скриптами
                                                  cache: false,
                                                  data: "serverip="+serverip+"&port="+port,
                                                  success: function(res){
                                                    $("#icecaststatus_"+orderid).html(res);
						    $("#icecaststatus_full_"+orderid).html(res);
                                                  }
                                   });
                                 }
        </script>
	<script type="text/javascript">
          /*if(window.opera) {
                   document.write('<link rel="stylesheet" type="text/css" href="http://<?php echo $_SERVER['SERVER_NAME'];?>/billing/opera.css" />');
          }   */
      var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
	var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox');
	var IE='\v'=='v'; 
      if(is_chrome)
      {}
      else
      {
        if(window.opera) {
                   document.write('<link rel="stylesheet" type="text/css" href="http://<?php echo $_SERVER['SERVER_NAME'];?>/billing/opera.css" />');
          }
         if(is_firefox) {
                   document.write('<link rel="stylesheet" type="text/css" href="http://<?php echo $_SERVER['SERVER_NAME'];?>/billing/firefox.css" />');
          }
	  if (IE) {
		document.write('<link rel="stylesheet" type="text/css" href="http://<?php echo $_SERVER['SERVER_NAME'];?>/billing/ie.css" />');
	  }
      }
    </script>
</head>
<body>
<?php
if(($current_controller=='users') and ($current_action=='login'))
{
	//LOGIN PAGE
	?>
	<div class="billing_not_logged_wrp">
				<div class="header_line">
				    <div class="logo">
					<a href="http://radioheart.ru"><?php echo $this->Html->image('footer_logo.png');?></a>
				    </div>
		       </div>
		<div class="billing_not_logged_main" id="billing_login_wrapper">
			<table>
				<tr valign="top">
					<td width="232">
						<div class="billing_enter_text">Войти в биллинг</div>
						<div class="users form">
						<?php echo $this->Session->flash('auth'); ?>
						<?php echo $this->Form->create('User'); ?>
						<?php echo $this->Form->input('login',array(
							'label'=>false,
							'placeholder'=>'Логин',
							'required'=>true
							));
							echo $this->Form->input('password',array(
							'label'=>false,
							'placeholder'=>'Пароль',
							'required'=>true
							));
							/*echo $this->Form->input('remember',array(
							'label'=>'Запомнить',
							'type'=>'checkbox',
							'div'=>array('class'=>'billing_login_remember')
							));*/
						?>
						<?php echo $this->Form->end(__('Войти')); ?>
						</div>
					</td>
					<td>
						<?php
						//var_export($this->Session->flash());
						$message=$this->Session->flash();
						
						if($message!=false)
						{
							$tmp=explode(" | ",$message);
							$divtxt=$tmp[0];
							$message=$tmp[1];
							//$message = $this->Session->read('Message.flash.message');
							echo '<div class="billing_enter_text">'.$divtxt.'</div>
							<div class="billing_enter_notice">
							'.$message.'
							</div>';
						}
						else
						{
							?>
							<div class="billing_enter_text">Не зарегистрированы?</div>
							<div class="billing_enter_notice">
								Для заказа услуг требуется учетная
								запись. Регистрация не займет у вас 
								больше пяти минут.
							</div>
							<?php
						}
						?>
							<div class="billing_enter_reg_lnk">
								<?php echo $this->Html->link('Перейти к регистрации',array('controller' => 'users', 'action' => 'add', 'full_base' => true));?>
								<br>
								<?php echo $this->Html->link('Забыли пароль?',array('controller' => 'users', 'action' => 'forgetpass', 'full_base' => true));?>
							</div>
						
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="billing_enter_footer_wrp">
		<div class="billing_enter_footer">
			<div class="billing_enter_copies">
				©  2013  Компания «Radioheart.ru»
			</div>
			<div class="billing_enter_rh_lnk">
				<a href="http://radioheart.ru">Radioheart</a>
			</div>
		</div>
	</div>
	<?php
}
else
{
	//MAIN TEMPLATE
	//print_r($orders_for_autodj);
	$autodjlnk_arr=@$orders_for_autodj[0]['Order'];
	//print_r($autodjlnk_arr);
	if($autodjlnk_arr['serverip']=="")
	{
		$autodjlnk="#";
		$statlnk="#";
	}
	else
	{
		$autodjlnk="http://".$autodjlnk_arr['serverip']."/panel";
		$statlnk=$autodjlnk."/stats/";
	}
	//echo $autodjlnk;
?>
        <div class="header_wrapper">
            <div class="header_line">
                <div class="logo">
		    <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>"><?php echo $this->Html->image('heart_nolsd.png');?></a>
                </div>
                <div class="header_menu_wrapper">
                    <div class="header_menu_item header_menu_item_current"><a href="http://radioheart.ru/billing">Биллинг</a></div>
                    <div class="header_menu_item"><a href="<?php echo $autodjlnk;?>" target="_blank">Автодиджей</a></div>
                    <div class="header_menu_item"><a href="<?php echo $statlnk;?>" target="_blank">Статистика</a></div>
                    <div class="header_menu_item"><a href="http://radioheart.ru/manager">Панель Extra</a></div>
                </div>
                <div class="consultant_wrapper">
                    <!-- webim button -->
        				<a href="http://<?php echo $_SERVER['SERVER_NAME'] ?>/webim/client.php?locale=ru" onclick="if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('http://<?php echo $_SERVER['SERVER_NAME'] ?>/webim/client.php?locale=ru&url='+escape(document.location.href)+'&referrer='+escape(document.referrer), 'webim', 'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=485,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;" target="_blank"><img alt="" id="consultant_icon" border="0" src="http://<?php echo $_SERVER['SERVER_NAME'] ?>/webim/b.php?i=simple&lang=ru" />nline-консультант</a>
        			<!-- / webim button -->
                    <span class="header_billing_span"><a href="http://<?php echo $_SERVER['SERVER_NAME'] ?>/billing">Биллинг</a></span>
                </div>
                <div class="header_search_wrapper">
                    <input type="text" id="search_field"></input>
                </div>
            </div>
        </div>
	<div class="header_second_line_wrapper">
            <div class="header_second_line">
                <div class="header_second_line_left_links">
                    <!--<a href="#" class="header_second_line_left_links_current">Главное</a>-->
			<?php //echo $current_controller." - ".$current_action;
			if(($current_controller=='pages') and($current_action=='display'))
				echo $this->Html->link('Главное',array('controller' => 'pages', 'action' => 'index', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Главное',array('controller' => 'pages', 'action' => 'index', 'full_base' => true));
			if(($current_controller=='users') and($current_action=='addcredits'))
				echo $this->Html->link('Баланс',array('controller' => 'users', 'action' => 'addcredits', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Баланс',array('controller' => 'users', 'action' => 'addcredits', 'full_base' => true));
                    
			if(($current_controller=='orders') and($current_action!='api')and($current_action!='constructor')and($current_action!='player') or ($current_controller=='streams'))
				echo $this->Html->link('Заказы',array('controller' => 'orders', 'action' => 'index', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Заказы',array('controller' => 'orders', 'action' => 'index', 'full_base' => true));
			if($current_controller=='tickets')
				echo $this->Html->link('Тикеты',array('controller' => 'tickets', 'action' => 'index', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Тикеты',array('controller' => 'tickets', 'action' => 'index', 'full_base' => true));
			if((($current_controller=='orders') and($current_action=='api'))||(($current_controller=='orders') and($current_action=='constructor'))||(($current_controller=='orders') and($current_action=='player'))||($current_controller=='publicpages'))
				echo $this->Html->link('Приложения',array('controller' => 'orders', 'action' => 'constructor', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Приложения',array('controller' => 'orders', 'action' => 'constructor', 'full_base' => true));
			if($current_controller=='reviews')
				echo $this->Html->link('Отправить отзыв',array('controller' => 'reviews', 'action' => 'index', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Отправить отзыв',array('controller' => 'reviews', 'action' => 'index', 'full_base' => true));
			if($current_controller=='promos')
				echo $this->Html->link('Акции',array('controller' => 'promos', 'action' => 'index', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Акции',array('controller' => 'promos', 'action' => 'index', 'full_base' => true));			
			if(($current_controller=='users') and($current_action=='edit'))
				echo $this->Html->link('Настройки',array('controller' => 'users', 'action' => 'edit', 'full_base' => true),array('class'=>'header_second_line_left_links_current'));
			else
				echo $this->Html->link('Настройки',array('controller' => 'users', 'action' => 'edit', 'full_base' => true));		     
		     ?>
                </div>
                <div class="header_second_line_right_links">
                    <?php echo @$user_name_sidebar;?>, вы авторизованы <?php echo $this->Html->link(
						'выйти из биллинга',
						array('controller' => 'users', 'action' => 'logout', 'full_base' => true)
					    ); ?>
                </div>
            </div>
        </div>
	<div class="main_wrapper">
	  <div class="constructor">
		<?php echo $this->Session->flash(); ?>
		<?php echo $this->fetch('content'); ?>
          </div>
        </div>
        <div class="footer_wrapper">
            <div class="footer">
                <table>
                    <tr valign="top">
                        <td width="130">
                            <span class="footer_column_title">Услуги</span>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/services/radiohosting/">Радиохостинг</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/services/webhosting/">Хостинг сайтов</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/services/actions/">Акции</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/services/constructor/">Конструктор</a>
                            <!--<br /><br />
                            <a href="<?php echo $_SERVER['SERVER_NAME'];?>">Список услуг</a> -->
                        </td>
                        <td width="130">
                            <span class="footer_column_title">Компания</span>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/company/about/">О компании</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/company/review/">Обзор хостинга</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/category/news/">Новости</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/company/contract/">Публичный договор</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/company/warranty/">Гарантии</a>
                        </td>
                        <td width="130">
                            <span class="footer_column_title">Поддержка</span>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/support/manual/">Справочник</a>
                            <!--<br /><br />
                            <a href="#">Форум</a> -->
                        </td>
                        <td width="235">
                            <span class="footer_column_title">Связь</span>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/feedback/contacts/">Контакты</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'] ?>/webim/client.php?locale=ru" onclick="if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('http://<?php echo $_SERVER['SERVER_NAME'] ?>/webim/client.php?locale=ru&url='+escape(document.location.href)+'&referrer='+escape(document.referrer), 'webim', 'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=485,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;" target="_blank">Online-консультант</a>
                        </td>
                        <td width="100">
                            <a href="https://vk.com/radiohearthost"><?php echo $this->Html->image('vk.png');?></a>
                            <a href="https://www.facebook.com/radioheartru"><?php echo $this->Html->image('fb.png');?></a>
                            <a href="https://twitter.com/radioheartru"><?php echo $this->Html->image('tw.png');?></a>
                            <br /><br />
                            <a href="http://feed.radioheart.ru">Radioheart-Feed</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/#">Партнерам</a>
                        </td>
                        <td>
                            <div style="margin-top:32px;"></div>
                            <a href="http://extra.radioheart.ru">Extra.Radioheart</a>
                            <br /><br />
                            <a href="http://<?php echo $_SERVER['SERVER_NAME'];?>/billing">Биллинг</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="footer_line_wrapper">
            <div class="footer_line">
                <div class="footer_logo">
			<?php echo $this->Html->image('heart_nolsd.png');?>
                </div>
                <div class="footer_copies">
                    ©  2011 - <?php echo date("Y");?>   «Компания Radioheart.ru»<br/>
		    <a href="http://radioheart.ru/contract">Публичный договор на оказание услуг хостинга</a>
                </div>
                <div class="footer_lexma">
                    Создание сайта: <a href="http://lexma.net" target="_blank">lexma.net</a>
                </div>
            </div>
        </div>
	<!--
	<div id="container">
		<div id="header">
			<h1><?php //echo $this->Html->link($cakeDescription, 'http://cakephp.org'); ?></h1>
		</div>
		<div id="content">

			<?php //echo $this->Session->flash(); ?>

			<?php //echo $this->fetch('content'); ?>
		</div>
		<div id="footer">
			<?php /*echo $this->Html->link(
					$this->Html->image('cake.power.gif', array('alt' => $cakeDescription, 'border' => '0')),
					'http://www.cakephp.org/',
					array('target' => '_blank', 'escape' => false)
				);*/
			?>
		</div>
	</div>-->
	<?php //echo $this->element('sql_dump'); ?>
</body>
</html>
<?php
}
?>